package com.probox.common.entity.vo.centre.product;

import cn.hutool.core.date.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 商品信息查询
 */
@ApiModel(description = "商品信息查询")
@Data
public class ProductInfoQuery implements Serializable {
    @ApiModelProperty(value = "商品名称")
    private String productName;
    @ApiModelProperty(value = "商品一级ID")
    private Long categoryUidOne;
    @ApiModelProperty(value = "商品二级ID")
    private Long categoryUidTwo;
    @ApiModelProperty(value = "商品三级ID")
    private Long categoryUidThree;
    @ApiModelProperty(value = "统计时间范围")
    private List<Date> timeArray;
    @ApiModelProperty(value = "开始统计时间")
    private Date startTime;
    @ApiModelProperty(value = "结束统计时间")
    private Date endTime;
    @ApiModelProperty(value = "查询前多少")
    private Long number;
    @ApiModelProperty(value = "1涨幅榜 2跌幅度榜")
    private Long range;

    public Date getEndTime() {
        if (endTime!=null){
            endTime = DateUtil.endOfDay(endTime);
        }
        return  endTime;
    }



}
